<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<!DOCTYPE html>
<html lang="en">
<head>
<title>User Manage - ADMIN - BIG Data Center</title>

<link rel="stylesheet" type="text/css"
	href="${host}/static/DataTables-1.10.12/media/css/jquery.dataTables.css">

<style type="text/css" class="init">
</style>

<script type="text/javascript"
	src="${host}/static/DataTables-1.10.12/media/js/jquery.dataTables.js">
	
</script>
<script type="text/javascript" class="init">
	$(document).ready(function() {
		$('#dataTable').DataTable();
	});
</script>
</head>

<body>



	<div class="index">
		<!-- <h3 class="text-success"><i class="fa fa-newspaper-o"></i> News List</h3> -->
		<table id="dataTable" class="display ">
			<thead>
				<tr class="active">
					<th>Email</th>
					<th>Username</th>
					<th>Department</th>
					<th>Telephone</th>
					<th>IsInvited</th>
					<th>UserType</th>

					<th>Status</th>
					<th>Operation</th>
				</tr>
			</thead>
			<tfoot>
				<tr class="active">
					<th>Email</th>
					<th>Username</th>
					<th>Department</th>
					<th>Telephone</th>
					<th>IsInvited</th>
					<th>UserType</th>

					<th>Status</th>
					<th>Operation</th>
				</tr>
			</tfoot>
			<tbody>
				<c:forEach items="${users}" var="user">
					<tr>

						<td>${user.email}</td>
						<th>${user.username}</th>
						<th>${user.department}</th>
						<th>${user.telephone}</th>
						<c:if test="${user.isInvited==0}">
							<td>Yes</td>
						</c:if>
						<c:if test="${user.isInvited!=0}">
							<td>NO</td>
						</c:if>
						<td>${user.userType}</td>
						<c:if test="${user.status==0||user.status==null}">
							<td>未激活</td>
						</c:if>
						<c:if test="${user.status==1}">
							<td><a
								href="${host}/ybp/audit?id=${user.id}&status=${user.status}">未审核</a></td>
						</c:if>
						<c:if test="${user.status==2}">
							<td><a
								href="${host}/ybp/audit?id=${user.id}&status=${user.status}">已审核</a></td>
						</c:if>
						<td>
							<%--  <c:if  test="${user.status==1}">  <a href="${host}/ybp/audit?id=${user.id}" class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i> Audit</a></c:if> --%>
							<a href="${host}/ybp/edit?id=${user.id}"
							class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i>
								Edit</a> <a href="${host}/ybp/drop?id=${user.id}"
							class="btn btn-danger btn-xs"
							onclick="return confirm('Delete it ?')"><i
								class="fa fa-trash-o"></i> Drop</a>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	


	</div>

</body>
</html>
